home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C!T ROM 3
/
ct-rom iiib.zip
/
ct-rom iiib
/
WINDOWS
/
DIVERSEN
/
WINE02BX
/
APPT.ELC
< prev
next >
Wrap
Text File
|
1993-03-28
|
12KB
|
130 lines
;;; compiled by jwz@thalidomide on Sat Jan 9 00:03:29 1993
;;; from file /cadillac-th/jwz/emacs19/lisp/calendar/appt.el
;;; emacs version 19.4.1 Lucid.
;;; bytecomp version 2.09; 29-dec-92.
;;; optimization is on.
;;; this file uses opcodes which do not exist in Emacs18.
(if (and (boundp 'emacs-version)
(or (and (boundp 'epoch::version) epoch::version)
(string-lessp emacs-version "19")))
(error "This file was compiled for Emacs19."))
(byte-code "└┴!ê└┬!ç" [require calendar diary] 2)
(defvar appt-issue-message t "\
*If T, the diary buffer is checked for appointments. For an
appointment warning to be made, the time must be the first thing on
the line.")
(defvar appt-msg-countdown-list '(20 15 10 5 3 1) "\
*A list of the intervals in minutes before the appointment when
the warnings will be given. That is, if this were the list '(5 3 1),
then a notification would be given five minutes, three minutes, and
one minute before the appointment.")
(defvar appt-check-time-syntax nil "\
*Whether all diary entries are intended to beging with time specifications.
Appt will beep and issue a warning message when encountering unparsable
lines.")
(defvar appt-audible t "\
*Controls whether appointment announcements should beep.")
(defvar appt-display-mode-line t "\
*Controls if minutes-to-appointment should be displayed on the mode line.")
(defvar appt-announce-method 'appt-window-announce "\
*The name of the function used to notify the user of an impending
appointment. This is called with two arguments, the number of minutes
until the appointment, and the appointment description list.
Reasonable values for this variable are 'appt-window-announce,
'appt-message-announce, or 'appt-persistent-message-announce.")
(defvar appt-time-msg-list nil "\
The list of appointments for today. Use appt-add and appt-delete
to add and delete appointments from list. The original list is generated
from the today's diary-entries-list. The number before each time/message
is the time in minutes after midnight.")
(defconst max-time 1439 "\
11:59pm in minutes - number of minutes in a day minus 1.")
(byte-code "└└ç" [-1 appt-check-tick] 1)
(fset 'appt-message-announce #[(min-to-app appt) "└ ┬=½â├¬æ─┼ ë╞=½â╟¬ü╚ A@$!ç" [message min-to-app 0 "App't NOW." format "App't in %d minute%s -- %s" 1 "" "s" appt] 6 "\
Set appt-announce-method to the name of this function to cause appointment
notifications to be given via messages in the minibuffer."])
(fset 'appt-persistent-message-announce #[(min-to-app appt) "┴=½ê┬├A@\"¬É┬┼ë╞=½â╟¬ü╚A@$╔ ╩ =¼àè═ïê)¡ä╟ÿ?¡à╬╧\"*ç" [min-to-app 0 format "App't NOW -- %s" appt "App't in %d minute%s -- %s" 1 "" "s" selected-window minibuffer-window in-echo-area-already str ((byte-code "└┴ !êed|ê\ncç" [select-window minibuffer-window str] 2)) message "%s"] 5 "\
Set appt-announce-method to the name of this function to cause appointment
notifications to be given via messages in the minibuffer, but have those
messages stay around even if you type something (unlike normal messages)."])
(defvar appt-display-duration 5 "\
*The number of seconds an appointment message is displayed in its own
window if appt-announce-method is 'appt-window-announce.")
(fset 'appt-window-announce #[(min-to-app appt) "└┴!êè┬ï)ç" [require electric ((byte-code "└ ┴┬├ !8U¼å─ ê┼ êp╞╔Ä╩╦!q╠╬=½â╧¬ì╨ë╤=½â╥¬ü╙Q╘╒╓ ╫╪O!ë┌V½å┌Z¬é█╓ ▄▌O┌W½â▐¬ü▀R)α░!Γ!êπ$A@!êσµ!!êτ╞!êΦ)!+ç" [screen-height 3 window-edges selected-window appt-select-lowest-window split-window nil appt-disp-buf this-buffer ((byte-code "½ä┴!ê┴ç" [appt-disp-buf kill-buffer] 2)) get-buffer-create "*appt-buf*" "-------------------- Appointment " min-to-app 0 "NOW" "in " 1 " minute" " minutes" ". (" string-to-int current-time-string 11 13 h 12 ":" 14 16 "am" "pm" ") %-" mode-line-format pop-to-buffer insert-string appt shrink-window-if-larger-than-buffer get-buffer-window set-buffer-modified-p sit-for appt-display-duration] 9))] 2 "\
Set appt-announce-method to the name of this function to cause appointment
notifications to be given via messages in a pop-up window. The variable
appt-display-duration controls how long this window should be left up."])
(byte-code "└┴!¼é┬┬ç" [boundp appt-screen-defaults nil] 2)
(fset 'appt-screen-announce #[(min-to-app appt) "è└┴!q├ ê─╞=½â╟¬î╚ë╔=½â╩¬ü╦Q╠═╬ ╧╨O!ë╥V½å╥Z¬é╙╬ ╘╒O╥W½â╓¬ü╫R)╪░┌A@!ê▄▌▐ed\"▀\\^] ßΓ!½ó\"½₧π $σ\"!êµ\"!êτ !êΦ╞!êσ$!)¬ÅΘΩ+∞α BD\"!ë\"*ç" [get-buffer-create "*appt-buf*" appt-disp-buf erase-buffer "-------------------- Appointment " min-to-app 0 "NOW" "in " 1 " minute" " minutes" ". (" string-to-int current-time-string 11 13 h 12 ":" 14 16 "am" "pm" ") %-" mode-line-format insert-string appt 10 20 count-lines 2 height boundp appt-disp-screen selected-screen s select-screen make-screen-visible set-screen-height sit-for x-create-screen append appt-screen-defaults (width . 80)] 9 "\
Set appt-announce-method to the name of this function to cause appointment
notifications to be given via messages in a pop-up screen."])
(fset 'appt-select-lowest-window #[nil "└ ┬ AAA@─ ╞¡¡╚ ╩┬ !8W½å ╠ !ê =½ç╠ !ê═*¬O+ç" [selected-window lowest-window window-edges bottom-edge previous-window last-window t window-search next-window this-window 3 next-bottom-edge select-window nil] 3 "\
Determines which window is the lowest one being displayed and
selects that one."])
(defvar appt-mode-line-string "" "\
*The string displayed in the mode line by the appointment package.")
(fset 'appt-display-mode-line #[(min-to-app) "½Ö ½û ┬=½â├¬Å─ ë┼=½â╞¬ü╟Q¬ü╚ ½ª\n¼ç╚╔D\n¬¢\n;½ê\n╔D\n¬Ä╔\n>¼ê╦\n╔C\"\nè╠ qê)═╬ !ê╧┬!ç" [appt-display-mode-line min-to-app 0 "App't NOW " "App't in " 1 " minute " " minutes " "" appt-mode-line-string global-mode-string append other-buffer set-buffer-modified-p buffer-modified-p sit-for] 4 "\
Add an appointment annotation to the mode line."])
(fset 'appt-convert-time #[(time2conv) "└┴\n\"½é├ç└─\n\"½é┼ç├ë└╚\n\"¼à╔╩\n\"ê╦\n╠ö╠òO!═ö½è╦\n═ö═òO!╬ö½▓├U¼å╧V½à╔╨\n\"ê└╤\n╬ö╥O\"½ï╧U½æ├¬î╧W½å╧\\╙V½à╔╘\n\"ê╒_\\*ç" [string-match "^[ ]*midni\\(ght\\|te\\)[ ]*\\'" time2conv 0 "^[ ]*noon[ ]*\\'" 720 min hr "\\`[ ]*\\([0-9][0-9]?\\)[ ]*\\(:[ ]*\\([0-9][0-9]\\)\\)?[ ]*\\(am\\|pm\\)?" error "unparsable time \"%s\"" string-to-int 1 3 4 12 "mixing 12hr and 24 hr time! %s" "am" nil 59 "minutes outa bounds - %s" 60] 5 "\
Convert hour:min[am/pm] format to minutes from midnight."])
(fset 'appt-current-time-in-seconds #[nil "└ ┬ ├─O!┬ ╞╟O!╔_\\+ç" [current-time-string str string-to-int 11 13 hour 14 16 min 60] 4 "\
returns the current time in seconds since midnight."])
(byte-code "└┴Mê┬├Mç" [appt-sort-list #[(appt-list) "└┴\n!├\"ç" [sort copy-sequence appt-list #[(x y) "@@ @@Wç" [x y] 2]] 3] appt-diary-entries #[nil "└┴ë┼╞!ê+ç" [(appt-make-list) nil diary-list-include-blanks diary-display-hook list-diary-entries-hook diary 1 appt-time-msg-list] 3]] 2)
(fset 'appt-initialize #[nil "└ ê┴ Gë├U½à─┼!¬É\n╞U½à─╟!¬å─╚╔\n\"!)ç" [install-display-time-hook appt-diary-entries n 0 message "no appointments today." 1 "1 appointment today." format "%d appointments today."] 5 "\
Read your `diary-file' and remember today's appointments. Call this from
your .emacs file, or any time you want your .diary file re-read (this happens
automatically at midnight to move to notice the next day's appointments).
The time must be at the beginning of a line for it to be put in the
appointments list.
02/23/89
12:00pm lunch
Wednesday
10:00am group meeting"])
(fset 'appt-make-list #[nil "└\nâì \n└ë½∙┼╞ @@\"½≡@A@╚╔\"½╡╩ò╠ö╠òO╠òO╧!C└O╤QCBB,¬D½ú╚╙\"½£╘ ê╒╓╠ö╠òO\"ê╫╪!ê╩ò└O¬])Aë¼┘ƒ \"*┌ !█ @@@ ½òW½Ä Aë½p @@@¬h* ç" [nil appt-time-msg-list diary-entries-list new-appts entry-list calendar-date-equal calendar-current-date time-string string-match "\\`[ \n]*\\([0-9]?[0-9]\\(:[0-9][0-9]\\)?[ ]*\\(am\\|pm\\)?\\|noon\\|midnight\\|midnite\\).*$" 0 eol 1 appt-time-string appt-msg-string appt-convert-time appt-time ":" appt-check-time-syntax "\n*\\([^\n]+\\)$" beep message "Unparsable time: %s" sit-for 3 append appt-sort-list appt-current-time-in-seconds appt-comp-time cur-comp-time] 6 "\
Don't call this directly; call appt-initialize or appt-diary-entries."])
(fset 'appt-beep #[nil "¼é┴纽Æë├V¡ë─ ê\nSë¬s)ç:½í@A:½â@\n├V¡ì─ ê╞!ê\nSë¬o*ç─ ç" [appt-audible nil i 0 beep j sleep-for-millisecs] 3])
(fset 'appt-check #[nil "àε ┴┬┼ ëUV ½â╩ êâΩ @@@ëZ½ÿW½æAë½m@@@¬d═╬\"W½ù═╬\"\\V½èTZ╤═╬\"V½à╥╤!¬τ¼ï╙U¼ë>¼â╤¬╒╙U½ú╘╒@A@\"½Ö@A@╙òS╤O╤╫╪Å┌!*¬¡═╬\"X½í╙Y½£█ ê@\"ê╥!ê╙U¡ïAë¬â╥╤!)¬â╥╤!-ç" [appt-issue-message -1 "" new-time min-to-app appt-current-time-in-seconds cur-comp-time appt-check-tick shut-up-this-time turnover-p appt-diary-entries appt-time-msg-list appt-comp-time apply max appt-msg-countdown-list max-time nil appt-display-mode-line 0 string-match "%%(" list-string (read list-string) ((error (byte-code "└ ê┴┬@A@\"ê─┼!ê╞ç" [ding message "Appt: error reading from \"%s\"" appt-time-msg-list sit-for 2 nil] 3))) form eval appt-beep appt-announce-method] 5 "\
Check for an appointment and update the mode line and minibuffer if
desired. Note: the time must be the first thing in the line in the diary
for a warning to be issued.
The format of the time can be either 24 hour or am/pm. Example:
02/23/89
18:00 Dinner
Thursday
11:45am Lunch meeting.
The following variables control the action of the notification:
appt-issue-message If this variable is nil, then the code in this
file does nothing.
appt-msg-countdown-list Specifies how much warning you want before
appointments.
appt-audible Whether to beep when it's notification-time.
appt-display-mode-line Whether to display a countdown to the next
appointment in the mode-line.
appt-announce-method The function used to do the notifications.
'appt-window-announce to do it in a pop-up
window, 'appt-message-announce or
'appt-persistent-message-announce to do it
in the echo-area.
appt-display-duration If appt-announce-method is set to the function
'appt-window-announce, this specifies how many
seconds the pop-up window should stick around.
This function is run from the `loadst' or `wakeup' process for display-time.
Therefore, you need to have (display-time) in your .emacs file."])
(fset 'appt-add #[(new-appt-time new-appt-msg) "└┴\n\"¼ä├─!ê\n┼Q╚\n!Cë CB\n╦\nC\"═!ë+ç" [string-match "[0-9]?[0-9]:[0-9][0-9]\\(am\\|pm\\)?" new-appt-time error "Unacceptable time-string" " " new-appt-msg appt-time-string appt-convert-time appt-time time-msg append appt-time-msg-list appt-sort-list] 4 "\
Adds an appointment to the list of appointments for the day at TIME
and issue MESSAGE. The time should be in either 24 hour format or
am/pm format. " "sTime (hh:mm[am/pm]): \nsMessage: "])
(fset 'appt-delete #[nil " ½Ñ @├─\nA@!┼Q╟! A½à╔\n\"╩+¬X╠═!)ç" [appt-time-msg-list tmp-msg-list element "Delete " prin1-to-string " from list? " prompt-string y-or-n-p test-input delq nil tmp-appt-msg-list message ""] 3 "\
Deletes an appointment from the list of appointments." nil])
(defvar display-time-hook nil "\
*List of functions to be called when the time is updated on the mode line.")
(byte-code "└┬├!¼é─┼╞Mê╟╚!ç" [appt-check display-time-hook boundp display-time-hook-installed nil install-display-time-hook #[nil "?¡├┴┬!½ƒ┴├!½Ü─┼!½ê┴╞!½â╞¬¢╟╚╔ \"½â┬¬æ├¬Ä─┼!½ê┴╩!½â╩¬ü╦═KMê╬Mê)╧ëç" [display-time-hook-installed fboundp display-time-filter-18-55 display-time-filter-18-57 featurep timer display-time-timer-function string-match "18\\.5[0-5]" emacs-version display-time-function display-time-filter old-fn old-display-time-filter #[(&rest args) "└┴\n\"ê├─!ç" [apply old-display-time-filter args run-hooks display-time-hook] 3 "Revised version of the original function: this version calls a hook."] t] 3] provide appt] 2)